import serve from "../utils/request.js"
/* 登录 */
export const area = (params) => {
  let data = serve({
    url: "addons/shopro/address/area",
    method: "post",
    // data: params
  })
  return data
}
export const edit = (params) => {
  let data = serve({
    url: "addons/shopro/address/edit",
    method: "post",
    data: params
  })
  return data
}
export const user = (params) => {
  let data = serve({
    url: "addons/shopro/user",
    method: "post",
    data: params
  })
  return data
}
export const init = (params) => {
  let data = serve({
    url: "addons/shopro/index/init",
    method: "get",
    // data: params
  })
  return data
}
export const recharge = (params) => {
  let data = serve({
    url: "addons/shopro/trade_order/recharge",
    method: "post",
    data: params
  })
  return data
}
export const detail = (params) => {
  let data = serve({
    url: "addons/shopro/trade_order/detail",
    method: "get",
    data: params
  })
  return data
}
export const prepay = (params) => {

  let data = serve({
    url: "addons/shopro/pay/prepay",
    method: "post",
    data: params
  })
  return data
}
export const orderIndex = (params) => {

  let data = serve({
    url: "addons/shopro/order/index",
    method: "get",
    data: params
  })
  return data
}

export const coupons = (params) => {

  let data = serve({
    url: "addons/shopro/coupons",
    method: "get",
    data: params
  })
  return data
}
export const address = (params) => {

  let data = serve({
    url: "addons/shopro/address",
    method: "get",
    data: params
  })
  return data
}
export const info = (params) => {

  let data = serve({
    url: "addons/shopro/address/info",
    method: "get",
    data: params
  })
  return data
}

export const itemDetail = (params) => {

  let data = serve({
    url: "addons/shopro/order/itemDetail",
    method: "get",
    data: params
  })
  return data
}
export const aftersale = (params) => {

  let data = serve({
    url: "addons/shopro/order_aftersale/aftersale",
    method: "post",
    data: params
  })
  return data
}

export const order_aftersale = (params) => {

  let data = serve({
    url: "addons/shopro/order_aftersale/detail",
    method: "get",
    data: params
  })
  return data
}

export const order_detail = (params) => {

  let data = serve({
    url: "addons/shopro/order/detail",
    method: "get",
    data: params
  })
  return data
}
export const confirm = (params) => {

  let data = serve({
    url: "addons/shopro/order/confirm",
    method: "post",
    data: params
  })
  return data
}
export const delete1 = (params) => {

  let data = serve({
    url: "addons/shopro/order/delete",
    method: "post",
    data: params
  })
  return data
}
export const profile = (params) => {

  let data = serve({
    url: "addons/shopro/user/profile",
    method: "post",
    data: params
  })
  return data
}
export const cancel = (params) => {

  let data = serve({
    url: "addons/shopro/order/cancel",
    method: "post",
    data: params
  })
  return data
}
export const orderDelete = (params) => {

  let data = serve({
    url: "addons/shopro/order/delete",
    method: "post",
    data: params
  })
  return data
}
export const orderDetail = (params) => {

  let data = serve({
    url: "addons/shopro/order/detail",
    method: "get",
    data: params
  })
  return data
}
